//
//  ScannerViewController.h
//  Ezi2u
//
//  Created by mac on 16/9/22.
//  Copyright © 2016年 mac. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
static const char *kScanQRCodeQueueName = "ScanQRCodeQueue";
typedef void (^ReturnQRCodeBlock)(NSString *QRCodeString);
@interface ScannerViewController : UIViewController<AVCaptureMetadataOutputObjectsDelegate>

@property (weak, nonatomic) IBOutlet UIView *viewPreview;
@property (strong,nonatomic) AVCaptureSession *captureSession;
@property (strong,nonatomic) AVCaptureVideoPreviewLayer *videoPreviewLayer;

@property (nonatomic) BOOL isReading;
@property (copy, nonatomic) ReturnQRCodeBlock qrCodeBlock;
@property (copy, nonatomic) NSString *qrCodeStr;
- (IBAction)backTo:(id)sender;

-(void)initQRCodeBlock:(ReturnQRCodeBlock)block;
@end
